* OPEN STATA OUTPUT FILE LOG *


log using "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Output/APPENDIX B MODELS.04-20-2021.smcl", replace

   
   
      

   **** APPENDIX C: WEIBULL PROPORTIONAL HAZARD MODEL ESTIMATES OF CONFIRMATION DECAY ****
 
 
 
 

 
 * OPEN UPDATED "CONFIRMATION DYNAMICS" DATABASE [08-13-2020] *
 
use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace



******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************





*** MODEL B.1: ESTIMATES FOR OVERALL CONFIRMATION DELAY [CONFIRMATION DATE - NOMINATION DATE] USING WEIBULL PH REGRESSION ****
*drop _d _t _t0

** STEP 1: ADD A CONSTANT OF 1 TO THE CONFIRMATION DURATION VARIABLE SO THAT IMMEDIATE CONFIRMATIONS ARE NOT CENSORED [CONFDURPLUS1 = confdur + 1] 
gen confdurplus1 = confdur + 1

** STEP 2: SPECIFY NOMINATIONS THAT RESULT IN CONFIRMATIONS IN SAME CONGRESS [CONFIRMOBSERVED==0] AS 'FAILURES' WHEN SETTING THE DEPENDENT VARIABLE'S SURVIVAL FUNCTION **
stset confdurplus1, failure(confirmobserved)
*
** STEP 3: ESTIMATE A WEIBULL HAZARD MODEL AND REPORT COEFFICIENTS IN  HAZARD RATIO FORM **
streg filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
senmajagencyideoloppose senmajagencyideolalign agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated  ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43, distribution(weibull) vce(cluster sbagency) 

estimates store base1



*** NEED TO PRESENT THE INTERACTION COEFFICIENTS IN THE SAME RANGE-BASED INTERPRETATION AS DONE IN THE ASYMMETRIC LAPLACE REGRESSIONS: ///
*** ONLY IT WILL TAKE ONLY ONE COMMAND LINE PER INTERACTION TERM: FOUR INTERACTION TERMS REPRESENTING H1-H4: ///

*** H1: filipresdistlewiszbtoplev2 * 0.401 ///
*** H2: senpartydiffmedlewiszbtoplev2 * 0.118 ///
*** H3: agencyindzbtoplev2 * 2.673 ///
*** H4: zloyalmedianzbtoplev2 * 4.5765  ///


*** GENERATE AVERAGE MARGINAL EFFECTS FROM ABOVE AND INSERT ON A SINGLE GRAPH *** 
lincomest filipresdistlewiszbtoplev2  * 0.401
est store abs1
*
est restore base1
lincomest senpartydiffmedlewiszbtoplev2 * 0.118
est store sen1
*
est restore base1
lincomest agencyindzbtoplev2 * 2.673
est store agen1
*
est restore base1
lincomest zloyalmedianzbtoplev2 * 4.5765
est store zloy1
*
*
coefplot abs1 sen1 agen1 zloy1, xline(0, lcolor(gs0) lpattern(dash)) ylabel(.7 "|President-Senate Filibuster Pivot|" .9 "Senate Party Polarization" 1.1 "Decision Maker Independence" 1.3 "Presidential Nominee Loyalty", labsize(medsmall)) msymbol(o) mcolor(black) msize(medium) ciopts(lcolor(black)) legend(off)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix B/FigureB1.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix B/FigureB1.eps"
*added titles at .7 (Absolute Filibuster Distance), .9 (Senate Median), 1.1 (Agency Independence), 1.3 (Loyalty Median)

*
*
*
*



*** MODEL B.2: ESTIMATES FOR INFORMATION VETTING CONFIRMATION DELAY [REPORTED OUT OF SENATE COMMITTEE DATE - NOMINATION DATE] USING WEIBULL PH REGRESSION ****
drop _d _t _t0

** STEP 1: ADD A CONSTANT OF 1 TO THE CONFIRMATION DURATION VARIABLE SO THAT IMMEDIATE CONFIRMATIONS ARE NOT CENSORED [CONFDURPLUS1 = confdur + 1] 
gen legvetdurplus1 = legvetdur + 1

** STEP 2: SPECIFY NOMINATIONS THAT RESULT IN CONFIRMATIONS IN SAME CONGRESS [CONFIRMOBSERVED==0] AS 'FAILURES' WHEN SETTING THE DEPENDENT VARIABLE'S SURVIVAL FUNCTION **
stset legvetdurplus1, failure(confirmobserved)
*
** STEP 3: ESTIMATE A WEIBULL HAZARD MODEL AND REPORT COEFFICIENTS IN HAZARD RATIO FORM **
streg filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
senmajagencyideoloppose senmajagencyideolalign agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43, distribution(weibull) vce(cluster sbagency) 

estimates store base2

*** NEED TO PRESENT THE INTERACTION COEFFICIENTS IN THE SAME RANGE-BASED INTERPRETATION AS DONE IN THE ASYMMETRIC LAPLACE REGRESSIONS: ///
*** ONLY IT WILL TAKE ONLY ONE COMMAND LINE PER INTERACTION TERM: FOUR INTERACTION TERMS REPRESENTING H1-H4: ///

*** H1: filipresdistlewiszbtoplev2 * 0.401 ///
*** H2: senpartydiffmedlewiszbtoplev2 * 0.118 ///
*** H3: agencyindzbtoplev2 * 2.673 ///
*** H4: zloyalmedianzbtoplev2 * 4.5765  ///


*** GENERATE AVERAGE MARGINAL EFFECTS FROM ABOVE AND INSERT ON A SINGLE GRAPH *** 
lincomest filipresdistlewiszbtoplev2 * 0.401
est store abs2
*
est restore base2
lincomest senpartydiffmedlewiszbtoplev2 * 0.118
est store sen2
*
est restore base2
lincomest agencyindzbtoplev2 * 2.673
est store agen2
*
est restore base2
lincomest zloyalmedianzbtoplev2 * 4.5765
est store zloy2
*
*
coefplot abs2 sen2 agen2 zloy2, xline(0, lcolor(gs0) lpattern(dash)) ylabel(.7 "|President-Senate Filibuster Pivot|" .9 "Senate Party Polarization" 1.1 "Decision Maker Independence" 1.3 "Presidential Nominee Loyalty", labsize(medsmall)) msymbol(o) mcolor(black) msize(medium) ciopts(lcolor(black)) legend(off)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix B/FigureB2.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix B/FigureB2.eps"
*added titles at .7 (Absolute Filibuster Distance), .9 (Senate Median), 1.1 (Agency Independence), 1.3 (Loyalty Median)


*
*
*
*
*


*** MODEL B.3: ESTIMATES FOR PROCEDURAL VETTING CONFIRMATION DELAY [CONFIRMATION DATE - REPORTED OUT OF SENATE COMMITTEE DATE] USING WEIBULL PH REGRESSION ****
drop _d _t _t0

** STEP 1: ADD A CONSTANT OF 1 TO THE CONFIRMATION DURATION VARIABLE SO THAT IMMEDIATE CONFIRMATIONS ARE NOT CENSORED [CONFDURPLUS1 = confdur + 1] 
gen polvetdurplus1 = polvetdur + 1

** STEP 2: SPECIFY NOMINATIONS THAT RESULT IN CONFIRMATIONS IN SAME CONGRESS [CONFIRMOBSERVED==0] AS 'FAILURES' WHEN SETTING THE DEPENDENT VARIABLE'S SURVIVAL FUNCTION **
stset polvetdurplus1, failure(confirmobserved)
*
** STEP 3: ESTIMATE A WEIBULL HAZARD MODEL AND REPORT COEFFICIENTS IN  HAZARD RATIO FORM **
streg filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing  excalendarcong ///
senmajagencyideoloppose senmajagencyideolalign agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43, distribution(weibull) vce(cluster sbagency) 

estimates store base3

*** NEED TO PRESENT THE INTERACTION COEFFICIENTS IN THE SAME RANGE-BASED INTERPRETATION AS DONE IN THE ASYMMETRIC LAPLACE REGRESSIONS: ///
*** ONLY IT WILL TAKE ONLY ONE COMMAND LINE PER INTERACTION TERM: FOUR INTERACTION TERMS REPRESENTING H1-H4: ///

*** H1: filipresdistlewiszbtoplev2 * 0.401 ///
*** H2: senpartydiffmedlewiszbtoplev2 * 0.118 ///
*** H3: agencyindzbtoplev2 * 2.673 ///
*** H4: zloyalmedianzbtoplev2 * 4.5765  ///


*** GENERATE AVERAGE MARGINAL EFFECTS FROM ABOVE AND INSERT ON A SINGLE GRAPH *** 
lincomest filipresdistlewiszbtoplev2 * 0.401
est store abs3
*
est restore base3
lincomest senpartydiffmedlewiszbtoplev2 * 0.118
est store sen3
*
est restore base3
lincomest agencyindzbtoplev2 * 2.673
est store agen3
*
est restore base3
lincomest zloyalmedianzbtoplev2 * 4.5765
est store zloy3
*
*
coefplot abs3 sen3 agen3 zloy3, xline(0, lcolor(gs0) lpattern(dash)) ylabel(.7 "|President-Senate Filibuster Pivot|" .9 "Senate Party Polarization" 1.1 "Decision Maker Independence" 1.3 "Presidential Nominee Loyalty", labsize(medsmall)) msymbol(o) mcolor(black) msize(medium) ciopts(lcolor(black)) legend(off)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Appendix B/FigureB3.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Appendix B/FigureB3.eps"
*added titles at .7 (Absolute Filibuster Distance), .9 (Senate Median), 1.1 (Agency Independence), 1.3 (Loyalty Median)




log close
